package com.glory.dgcpcpda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.dgcpcpda.R;
import com.glory.dgcpcpda.entity.SimpleEntity;

import java.util.List;

/**
 * FileName: MantissaLotListAdapter
 * Author: XJH
 * Date: 2020/7/31 10:19
 * Description:
 * History:
 */
public class MantissaLotListAdapter extends BaseQuickAdapter<SimpleEntity.MantissaLotBinData, BaseViewHolder> {
    boolean isTap = false;
    public MantissaLotListAdapter(@Nullable List<SimpleEntity.MantissaLotBinData> data,boolean isTap) {
        super(R.layout.item_bin_info_list,data);
        this.isTap = isTap;
    }

    @Override
    protected void convert(BaseViewHolder helper, SimpleEntity.MantissaLotBinData item) {
        helper.setText(R.id.list_tv1,item.getLOTID());
        helper.setText(R.id.list_tv2,item.getBINNAME());
        helper.setGone(R.id.list_tv3,!isTap);
        helper.setText(R.id.list_tv3,item.getBINDESC());
        helper.setGone(R.id.list_tv4,true);
        helper.setGone(R.id.list_tv5,true);
        helper.setText(R.id.list_tv4,item.getBINGRADE());
        helper.setText(R.id.list_tv5,String.valueOf(item.getMAINQTY()));
    }
}
